<?php
/*
 * Created on 12.03.2008
 *
 * filename: logout.php5
 */
 class Controller_Logout extends Controller_Base {
	function index ($args) {
			
	
		$user = new Model_User();
		
		if($user->is_logged())
			$user->logout();
		else
			return array(
				status 		=> 302,
				location	=> '/'
			);
		
		return array(
			status 		=> 302,
			location	=> '/',
			cookies		=> array(
				array(
					name 	=> sesid,
					value	=> '',
					time	=> -3600,
					path	=> '/'
				)
			) 
		);
	}
 }
?>
